import numpy as np
from matplotlib import pyplot as plt
prob_img = np.loadtxt('E:/大学课程资料/大四上/毕业设计/MSTAR_Clutter/prob.txt')
print(prob_img.shape)

def main():
    plt.imshow(prob_img, cmap='coolwarm')
    #plt.pcolormesh(X, Y, prob_img, cmap='coolwarm')  # coolwarm
    plt.colorbar()
    plt.title("Prob_image")  
    
    plt.savefig("prob_color.png")
    plt.show()

if __name__ == '__main__':
    main()
